package com.yyjj.hangqing.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yyjj.hangqing.R;
import com.yyjj.hangqing.entity.CacheEntity;

import tech.com.commoncore.manager.GlideManager;

public class EditCacheAdatpter extends BaseQuickAdapter<CacheEntity, BaseViewHolder> {
    public EditCacheAdatpter() {
        super(R.layout.hq_cache_edite_coin_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, CacheEntity item) {

        if (item.isChoose()) {
            GlideManager.loadImg(R.mipmap.hq_selete, (ImageView) helper.getView(R.id.img));
        } else {
            GlideManager.loadImg(R.mipmap.hq_no_selete, (ImageView) helper.getView(R.id.img));
        }

        helper.setText(R.id.name, item.getName());
        helper.setText(R.id.code, item.getSymbol());
    }
}
